from kivy.app import App
from kivy.uix.widget import Widget
from kivy.graphics import Color,Rectangle
from kivy.uix.button import Button



class MyApp(App):
    def build(self):
        w = Widget()
        b = Button(text="click me", on_press=lambda e: print("button clicked"))
        w.add_widget(b)
        with w.canvas:
            Color(1,1,1,1)
            Rectangle(pos=[100,100],size=[100,100])
            Rectangle(pos=[300, 500], size=[100, 100])

            # Button(text="click me", on_press=lambda e: print("button clicked"))

        return w



if __name__ == '__main__':
    MyApp().run()